<template>
	<cover-view class="top-window">
		<cover-view class="item" @click="onTopMethods('traffic')">
			<cover-image :src="isTraffic ? icon1 : icon" mode="aspectFill" class="t-img"></cover-image>
			<!-- <cover-image src="https://www.31gps.net/xcximage/xcx/ic_traffic_uncheck.png" class="t-img"></cover-image> -->
		</cover-view>
		<cover-view class="item" @click="onTopMethods('satellite')">{{satellite ? '卫星' : '标准'}}</cover-view>
		<!-- <cover-view class="item">车牌</cover-view>
		<cover-view class="item" style="border-right: 0;">隐藏</cover-view> -->
	</cover-view>
</template>

<script>
	import imgSrc from '../../utils/imgUrl.js'
	export default{
		props: {
			isTraffic: Boolean,
			satellite: Boolean
		},
		data() {
			return {
				icon: imgSrc.trafficUncheck,
				icon1: imgSrc.trafficCheck
			}
		},
		methods: {
			onTopMethods(str) {
				this.$emit('onTopMethods', str)
			}
		}
	}
</script>

<style scoped>
	.top-window{
		width: 214rpx;
		height: 68rpx;
		background: #FFFFFF;
		box-shadow: 0px 3rpx 7rpx 0px rgba(160, 153, 153, 0.35);
		border-radius: 8rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
	}
	.t-img{
		width: 44rpx;
		min-width: 44rpx;
		height: 18rpx;
	}
	.item{
		flex: 1;
		height: 30rpx;
		border-right: 1px solid #E4E4E4;
		color: #333333;
		font-size: 28rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}
</style>
